package persist

import (
	"fmt"
)

var dbs *Source

func init() {
	dbs = &Source{
		connMap: make(map[string]*Connect),
		oexMap:  make(map[string]IxOpsExt),
	}

	//建立数据源连接
	GetOexDefault()
	//建立数据源连接
	//dbo.GetDBConn()
}

type Source struct {
	connMap map[string]*Connect //ConnectManager
	oexMap  map[string]IxOpsExt
}

func GetSource() *Source {
	return dbs
}

func fmtSourceKey(driverName string, cfgName string) string {
	return fmt.Sprintf("%s|||%s", driverName, cfgName)
}
